package com.tang.fitten_cod;

import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author tmh
 * @date 2024/4/5 11:54
 * @description
 */
public class ReetranyLockTest {
    public static void main(String[] args) {

        CopyOnWriteArrayList<Integer> list=new CopyOnWriteArrayList<>();
        list.add(1);
        ReentrantLock lock=new ReentrantLock();
        lock.lock();
        try{
            System.out.println(121);
        }catch (Exception e){

        }finally {
            lock.unlock();
        }

    }
}
